The `BrightnessScale.value` property was originally called `brightness`,
and the methods used for keyboard shortcuts somehow missed the name change.
As a result, the methods try to set the brightness to `undefined`, which
is out of range and thus fails.
Use the correct property name to fix the shortcuts.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8570
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3825>
}
stepUp() {
- this._setValue(Math.min(1.0, this._brightness + SCALE_VALUE_STEP));
+ this._setValue(Math.min(1.0, this._value + SCALE_VALUE_STEP));
}
stepDown() {
- this._setValue(Math.max(0.0, this._brightness - SCALE_VALUE_STEP));
+ this._setValue(Math.max(0.0, this._value - SCALE_VALUE_STEP));
}
cycleUp() {
- if (Math.abs(1.0 - this._brightness) < SCALE_VALUE_CHANGE_EPSILON)
+ if (Math.abs(1.0 - this._value) < SCALE_VALUE_CHANGE_EPSILON)
this._setValue(0.0);
else
this.stepUp();